
package com.platform.modules.mall.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.platform.modules.mall.entity.MallShopsEntity;
import com.platform.modules.mall.entity.dto.MallShopsDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 店铺Dao
 *
 * @author
 * @date 2019-07-03 13:51:29
 */
@Mapper
public interface MallShopsDao extends BaseMapper<MallShopsEntity> {

    /**
     * 获取商圈下一级分类店铺数量
     *
     * @param id 商圈ID
     * @return List
     */
    List<Map<String,Object>> getCategoryCount(@Param("id") String id);

    /**
     * 获取店铺基础信息
     * @param id 店铺ID
     * @return
     */
    MallShopsDto shopsBaesInfo(@Param("id") String id,@Param("loca") String loca);

    /**
     * 自定义查询获取店铺信息
     * @param params
     * @return
     */
    List<Map<String,Object>> getShopsInfo(IPage page,@Param("params") Map<String, Object> params);

    /**
     * 分页获取店铺
     * @param params
     * @return
     */
    List<Map<String,Object>> getNearbyShopListNew(IPage page,@Param("params") Map<String, Object> params);


    /**
     * 分页获取店铺
     * @param page
     * @param params
     * @return
     */
    List<MallShopsDto> getNearbyShopList(IPage page, @Param("params") Map<String, Object> params);

    /**
     * 获取店铺下卡券
     * @param id
     * @return
     */
    List<String> getShopsCard(@Param("id") String id);

    MallShopsDto getShopByIdForApp(@Param("id")String id);

    List<Map<String, Object>> getNearbySimple(IPage page, @Param("params") Map<String, Object> params);
}
